package grafo.estrutura;

import java.io.Serializable;
import java.util.ArrayList;

public class ListaVertice extends ArrayList<Vertice> implements Serializable{

	private static final long serialVersionUID = 1L;

	public Vertice adicionarVertice(int aID, String aDescricao)
    {
        Vertice v = new Vertice(aID, aDescricao);
        this.add(v);
        return v;
    }

	public Vertice selecionar(int aID)
	{
		for(Vertice v : this)
			if(v.getID() == aID) return v;
		return null;
	}

}
